package com.yuliang.ai.controller;

import com.yuliang.ai.domain.Vo.AdminUserVo;
import com.yuliang.ai.service.AdminUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author Huangkai
 */
@Slf4j
@RestController
@RequestMapping("/admin")
public class AdminController {

    @Autowired
    AdminUserService adminUserService;

    @PostMapping("/login")
    public String login(@RequestBody AdminUserVo adminUserVo) {
        return adminUserService.login(adminUserVo);
    }

    @PostMapping("/syncToken")
    public String syncToken(@RequestBody AdminUserVo adminUserVo) {
        return adminUserService.syncToken(adminUserVo);
    }



}
